<template>
    <input type="text"
           value="0"
           @input="setNumber"
    >
</template>

<script>
    export default {
        name: "CalInput",
        props: {
            type: String
        },
        data() {
            return {}
        },
        methods: {
            setNumber(e) {
                var val = Number(e.target.value);
                this.$emit("dispatch", 'SET_NUMBER', this.type, val);
            }
        }
    }
</script>
<style scoped>
    input {
        margin-right: 10px;
    }
</style>
